# -*- coding: utf-8 -*-
"""
    APF.utils.dynamic_dict
    ~~~~~~~~~~~~~~
    动态字典对象
    :copyright: (c) 2018 XJJ by CornWu
"""

class DynamicDict(dict):
    """A dict that allows for object-like property access syntax."""
    def __getattr__(self, name):
        try:
            return self[name]
        except KeyError:
            raise AttributeError(name)

    def HasAttr(self,name):
        return self.has_key(name)